home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 September / september_2000.iso / intercd / root / ^Linux / cdrecord-1.8.1 / include / mconfig.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-03-25  |  6.3 KB  |  318 lines

  1. /* @(#)mconfig.h    1.32 00/03/25 Copyright 1995 J. Schilling */
  2. /*
  3.  *    definitions for machine configuration
  4.  *
  5.  *    Copyright (c) 1995 J. Schilling
  6.  *
  7.  *    This file must be included before any other file.
  8.  *    Use only cpp instructions.
  9.  *
  10.  *    NOTE: SING: (Schily Is Not Gnu)
  11.  */
  12. /*
  13.  * This program is free software; you can redistribute it and/or modify
  14.  * it under the terms of the GNU General Public License as published by
  15.  * the Free Software Foundation; either version 2, or (at your option)
  16.  * any later version.
  17.  *
  18.  * This program is distributed in the hope that it will be useful,
  19.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  * GNU General Public License for more details.
  22.  *
  23.  * You should have received a copy of the GNU General Public License
  24.  * along with this program; see the file COPYING.  If not, write to
  25.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  26.  */
  27.  
  28. #ifndef _MCONFIG_H
  29. #define _MCONFIG_H
  30.  
  31. /*
  32.  * This hack that is needed as long as VMS has no POSIX shell.
  33.  */
  34. #ifdef    VMS
  35. #    define    USE_STATIC_CONF
  36. #endif
  37.  
  38. #ifdef    USE_STATIC_CONF
  39. #include <xmconfig.h>    /* This is the current static autoconf stuff */
  40. #else
  41. #include <xconfig.h>    /* This is the current dynamic autoconf stuff */
  42. #endif
  43.  
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47.  
  48. /*
  49.  * The NetBSD people want to bother us.
  50.  * They removed the definition for 'unix' and are bleating for every test
  51.  * for #if defined(unix). So we need to check for NetBSD early.
  52.  */
  53. #ifndef    IS_UNIX
  54. #    if defined(__NetBSD__)
  55. #        define    IS_UNIX
  56. #    endif
  57. #endif
  58.  
  59. #ifndef    IS_UNIX
  60. #    if defined(unix) || defined(__unix) || defined(__unix__)
  61. #        define    IS_UNIX
  62. #    endif
  63. #endif
  64.  
  65. #ifdef    __MSDOS__
  66. #    define    IS_MSDOS
  67. #endif
  68.  
  69. #if defined(tos) || defined(__tos)
  70. #    define    IS_TOS
  71. #endif
  72.  
  73. #ifdef    THINK_C
  74. #    define    IS_MAC
  75. #endif
  76.  
  77. #if defined(sun) || defined(__sun) || defined(__sun__)
  78. #    define    IS_SUN
  79. #endif
  80.  
  81. #if defined(__CYGWIN32__) || defined(__CYGWIN__)
  82. #       define IS_GCC_WIN32
  83. #endif
  84.  
  85. /*--------------------------------------------------------------------------*/
  86. /*
  87.  * Some magic that cannot (yet) be figured out with autoconf.
  88.  */
  89.  
  90. #ifdef sparc
  91. #    ifndef    HAVE_LDSTUB
  92. #    define    HAVE_LDSTUB
  93. #    endif
  94. #    ifndef    HAVE_SCANSTACK
  95. #    define    HAVE_SCANSTACK
  96. #    endif
  97. #endif
  98. #if    defined(__i386_) || defined(i386)
  99. #    ifndef    HAVE_XCHG
  100. #    define    HAVE_XCHG
  101. #    endif
  102. #    ifndef    HAVE_SCANSTACK
  103. #    define    HAVE_SCANSTACK
  104. #    endif
  105. #endif
  106.  
  107. #if    defined(SOL2) || defined(SOL2) || defined(S5R4) || defined(__S5R4) \
  108.                             || defined(SVR4)
  109. #    ifndef    __SVR4
  110. #        define    __SVR4
  111. #    endif
  112. #endif
  113.  
  114. #ifdef    __SVR4
  115. #    ifndef    SVR4
  116. #        define    SVR4
  117. #    endif
  118. #endif
  119.  
  120. /*
  121.  * SunOS 4.x / SunOS 5.x
  122.  */
  123. #if defined(IS_SUN)
  124. #    define    HAVE_GETAV0
  125. #endif
  126.  
  127. /*
  128.  * AIX
  129.  */
  130. #if    defined(_IBMR2) || defined(_AIX)
  131. #    ifndef    IS_UNIX
  132. #    define    IS_UNIX        /* ??? really ??? */
  133. #    endif
  134. #endif
  135.  
  136. /*
  137.  * QNX
  138.  */
  139. #if defined(__QNX__)
  140. #    ifndef    IS_UNIX
  141. #    define    IS_UNIX
  142. #    endif
  143. #endif
  144.  
  145. /*
  146.  * Silicon Graphics    (must be before SVR4)
  147.  */
  148. #if defined(sgi) || defined(__sgi)
  149. #    define    __NOT_SVR4__    /* Not a real SVR4 implementation */
  150. #endif
  151.  
  152. /*
  153.  * Data General
  154.  */
  155. #if defined(__DGUX__)
  156. #ifdef    XXXXXXX
  157. #    undef    HAVE_MTGET_DSREG
  158. #    undef    HAVE_MTGET_RESID
  159. #    undef    HAVE_MTGET_FILENO
  160. #    undef    HAVE_MTGET_BLKNO
  161. #endif
  162. #    define    mt_type        mt_model
  163. #    define    mt_dsreg    mt_status1
  164. #    define    mt_erreg    mt_status2
  165.     /*
  166.      * DGUX hides its flock as dg_flock.
  167.      */
  168. #    define    HAVE_FLOCK
  169. #    define    flock    dg_flock
  170.     /*
  171.      * Use the BSD style wait on DGUX to get the resource usages of child
  172.      * processes.
  173.      */
  174. #    define    _BSD_WAIT_FLAVOR
  175. #endif
  176.  
  177. /*
  178.  * Apple Rhapsody (This is the name for Mac OS X beta)
  179.  */
  180. #if defined(__NeXT__) && defined(__TARGET_OSNAME) && __TARGET_OSNAME == rhapsody
  181. #    define HAVE_OSDEF /* prevent later definitions to overwrite current */
  182. #    ifndef    IS_UNIX
  183. #    define    IS_UNIX
  184. #    endif
  185. #endif
  186.  
  187. /*
  188.  * NextStep
  189.  */
  190. #if defined(__NeXT__) && !defined(HAVE_OSDEF)
  191. #define    NO_PRINT_OVR
  192. #undef    HAVE_USG_STDIO        /*
  193.                  *  NeXT Step 3.x uses __flsbuf(unsigned char , FILE *)
  194.                  * instead of __flsbuf(int, FILE *)
  195.                  */
  196. #    ifndef    IS_UNIX
  197. #    define    IS_UNIX
  198. #    endif
  199. #endif
  200.  
  201. /*
  202.  * Mac OS X
  203.  */
  204. #if defined(__APPLE__) && defined(__MACH__)
  205. #    ifndef    IS_UNIX
  206. #    define    IS_UNIX
  207. #    endif
  208. #    define    IS_MACOS_X
  209. #endif
  210.  
  211. /*
  212.  * NextStep 3.x has a broken linker that does not allow us to override
  213.  * these functions.
  214.  */
  215. #ifndef    __OPRINTF__
  216.  
  217. #ifdef    NO_PRINT_OVR
  218. #    define    printf    Xprintf
  219. #    define    fprintf    Xfprintf
  220. #    define    sprintf    Xsprintf
  221. #endif
  222.  
  223. #endif    /* __OPRINTF__ */
  224.  
  225. /*--------------------------------------------------------------------------*/
  226. /*
  227.  * If there is no flock defined by the system, use emulation
  228.  * through fcntl record locking.
  229.  */
  230. #ifndef HAVE_FLOCK
  231. #define LOCK_SH         1       /* shared lock */
  232. #define LOCK_EX         2       /* exclusive lock */
  233. #define LOCK_NB         4       /* don't block when locking */
  234. #define LOCK_UN         8       /* unlock */
  235. #endif
  236.  
  237. #include <prototyp.h>
  238.  
  239. /*
  240.  * gcc 2.x generally implements the long long type.
  241.  */
  242. #ifdef    __GNUC__
  243. #    if    __GNUC__ > 1
  244. #        ifndef    HAVE_LONGLONG
  245. #            define    HAVE_LONGLONG
  246. #        endif
  247. #    endif
  248. #endif
  249.  
  250. #ifdef    __CHAR_UNSIGNED__    /* GNU GCC define     (dynamic)    */
  251. #ifndef CHAR_IS_UNSIGNED
  252. #define    CHAR_IS_UNSIGNED    /* Sing Schily define (static)    */
  253. #endif
  254. #endif
  255.  
  256. /*
  257.  * Convert to GNU name
  258.  */
  259. #ifdef    HAVE_STDC_HEADERS
  260. #    ifndef    STDC_HEADERS
  261. #        define    STDC_HEADERS
  262. #    endif
  263. #endif
  264. /*
  265.  * Convert to SCHILY name
  266.  */
  267. #ifdef    STDC_HEADERS
  268. #    ifndef    HAVE_STDC_HEADERS
  269. #        define    HAVE_STDC_HEADERS
  270. #    endif
  271. #endif
  272.  
  273. #ifdef    IS_UNIX
  274. #    define    PATH_DELIM    '/'
  275. #    define    PATH_DELIM_STR    "/"
  276. #    define    far
  277. #    define    near
  278. #endif
  279.  
  280. #ifdef    IS_GCC_WIN32
  281. #    define    PATH_DELIM    '/'
  282. #    define    PATH_DELIM_STR    "/"
  283. #    define    far
  284. #    define    near
  285. #endif
  286.  
  287. #ifdef    __EMX__                /* We don't want to call it UNIX */
  288. #    define    PATH_DELIM    '/'
  289. #    define    PATH_DELIM_STR    "/"
  290. #    define    far
  291. #    define    near
  292. #endif
  293.  
  294. #ifdef    IS_MSDOS
  295. #    define    PATH_DELIM    '\\'
  296. #    define    PATH_DELIM_STR    "\\"
  297. #endif
  298.  
  299. #ifdef    IS_TOS
  300. #    define    PATH_DELIM    '\\'
  301. #    define    PATH_DELIM_STR    "\\"
  302. #    define    far
  303. #    define    near
  304. #endif
  305.  
  306. #ifdef    IS_MAC
  307. #    define    PATH_DELIM    ':'
  308. #    define    PATH_DELIM_STR    ":"
  309. #    define    far
  310. #    define    near
  311. #endif
  312.  
  313. #ifdef __cplusplus
  314. }
  315. #endif
  316.  
  317. #endif /* _MCONFIG_H */
  318.